<ion-view view-title="{{title}}" class="addpro">
	<ion-nav-bar ng-class="baseclass">
		<ion-nav-back-button></ion-nav-back-button>
	</ion-nav-bar>
	
	<ion-nav-buttons side="right">
		<!--<p class="savebtntext f-size-15" on-tap="save()">{{btnname}}</p>-->
		<button class="button button-clear saveText" on-tap="save()">{{btnname}}</button>
	</ion-nav-buttons>
	<ion-content class="bg">
		<div class="item item-input padding-0 margin-bottom-10 frame">
			<span class="activitytext1 activitynametext">活动名称</span>
			<input class="padding-0" ng-class="input.name?'activitytext1':'activitytext2'" type="text" ng-model="input.name" placeholder="请输入活动名称">
			<img src="./img/guilin/common/icon_delete_g@2x.png" ng-if="input.name" on-tap="clearinput(1)" />
		</div>
		<div class="item item-input padding-0 margin-bottom-10 describeframe">
			<div class="describemix">
				<span class="activitytext1 describetext">活动描述</span>
			</div>
			<textarea class="padding-right-10" ng-class="input.description?'activitytext1':'activitytext2'" rows="3" placeholder="请输入活动描述" ng-model="input.description"></textarea>
		</div>
		
		<li class="item item-input padding-0 frame margin-bottom-1" ion-datetime-picker title="'请输入开始时间'" is-hide-hour="true" ng-model="input.start_time">
			<span class="activitytext1">开始时间</span>
			<div class="activitytext2 text-right selecttime" ng-if="input.start_time==null">
				请选择
			</div>
			<div class="activitytext1 item-input padding-0 selecttime" ng-if="input.start_time!=null" style="padding-left: 30px;">
				<input type="text" placeholder="" readonly="" ng-class="{'timeNoneInfo':input.start_time}">{{input.start_time| date: "yyyy-MM-dd"}}</input>
			</div>
			<img class="margin-left-10-my margin-right-10-my" src="./img/guilin/common/icon_right@2x.png" />
		</li>
		
		<li class="item item-input padding-0 frame margin-bottom-1" ion-datetime-picker title="'请输入结束时间'" is-hide-hour="true" ng-model="input.end_time">
			<span class="activitytext1">结束时间</span>
			<div class="activitytext2 text-right selecttime" ng-if="input.end_time==null">
				请选择
			</div>
			<div class="activitytext1 item-input padding-0 selecttime" ng-if="input.end_time!=null" style="padding-left: 30px;">
				<input type="text" placeholder="" readonly="" ng-class="{'timeNoneInfo':input.end_time}">{{input.end_time| date: "yyyy-MM-dd"}}</input>
			</div>
			<img class="margin-left-10-my margin-right-10-my" src="./img/guilin/common/icon_right@2x.png" />
		</li>
		<div class="item item-input padding-0 margin-bottom-10 frame">
			<span class="activitytext1">优先级</span>
			<img class="noteimg" src="./img/guilin/common/icon_note@2x.png" on-tap="show_i()"/>
			<input class="activitynameinput " ng-class="input.sort_order?'activitytext1':'activitytext2'" type="text" ng-model="input.sort_order" ng-keyup="clearNoNum(input,'sort_order')" placeholder="请输入2位数字">
			<img src="./img/guilin/common/icon_delete_g@2x.png" ng-if="input.sort_order" on-tap="clearinput(2)" />
		</div>
		<div class="item item-input item-toggle padding-0 margin-bottom-10 frame activitytext1">
			是否开启
			<!--	<label class="toggle toggle-balanced swithframe">
             <input type="checkbox" ng-model="input.status" >
             <div class="track swithinput">
               <div class="handle swithcircular" ></div>
             </div>
           </label>-->
			<label class="toggle toggle-balanced swithframe">
             <input type="checkbox" ng-model="input.status"  >
             <div class="track ">
               <div class="handle" ></div>
             </div>
           </label>
		</div>
		<div class="item item-input frame activitytext1 margin-bottom-1">
			优惠条件<span class="padding-left-30">满</span>
			<div class="item-input padding-0 text-right">
				<input class="text-right padding-0" ng-class="input.max!='0.00'?'activitytext1':'activitytext2'" ng-model="input.max" type="text" placeholder="0.00">
				<span class="padding-top-bottom-10 ">元</span>
			</div>
		</div>
		<div class="item item-input padding-0 margin-bottom-1 frame">
			<span class="activitytext1" ng-if="input.solutions_checked!='freeshipping'">优惠方案</span>
			<span class="activitytext1" ng-if="input.solutions_checked=='freeshipping'">方案类型</span>
			<div class="activitytext2 selecttime text-right" on-tap="openModal_tag()" ng-if="input.solutions_checked==null">
				请选择<img src="./img/guilin/common/icon_right@2x.png" />
			</div>
			<div class="activitytext2 item-input padding-0 selecttime" on-tap="openModal_tag(input.solutions_checked)" ng-if="input.solutions_checked!=null">
				<span class="padding-left-30 activitytext1">{{input.discountname}}</span>
				<img class="right" src="./img/guilin/common/icon_right@2x.png" />
			</div>
		</div>
		<div class="item item-input frame activitytext1 margin-bottom-1" ng-if="input.solutions_checked=='byfixed'">
			订单总价减
			<div class="item-input padding-0 text-right">
				<input class="text-right padding-0" ng-class="input.byfixed_total_amount!='0.00'?'activitytext1':'activitytext2'" type="text" ng-model="input.byfixed_total_amount" placeholder="0.00">
				<span class="padding-top-bottom-10 ">元</span>
			</div>
		</div>
		<div class="item item-input frame activitytext1 margin-bottom-1" ng-if="input.solutions_checked=='topercent'">
			订单总价乘
			<div class="item-input padding-0 text-right">
				<input class="text-right padding-0" ng-class="input.topercent_percent!='0'?'activitytext1':'activitytext2'" type="text" ng-model="input.topercent_percent" placeholder="0">
				<span class="padding-top-bottom-10 ">%</span>
			</div>
		</div>
	</ion-content>
</ion-view>